package utils;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * 图片工具类
 */
public class ImageUtil {
    public static BufferedImage getImg(String path) {
        try {
            BufferedImage img;
            img = ImageIO.read(ImageUtil.class.getClassLoader().getResourceAsStream(path));
            return img;
        } catch (IOException e) {
            System.out.println("NULL");
        }
        return null;
    }
}
